<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>AutoJS PC Docs</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="Description" />
    <meta
      name="viewport"
      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
    />
    <meta http-equiv="cache-control" content="no-cache" />
    <link href="static/vue.css" rel="stylesheet" />
  </head>

  <body>
    <div id="app"></div>
    <script>
      var ua = navigator.userAgent || "";
      var searchParams = new URLSearchParams(window.location.search);
      var theme = searchParams.get("theme") || "vue";
      addCss(
        document.head,
        window.location.pathname + "static/" + theme + ".css"
      );

      window.$docsify = {
        name: "AutoJS PC版",
        basePath: "./",
        // repo: '',
        notFoundPage: true,
        loadSidebar: true,
        subMaxLevel: 2,
        loadNavbar: true,
        auto2top: true,
        coverpage: ["/", "/tntok/"],
        // coverpage:true,
        homepage: "README.md",
        maxAge: 0,
        alias: {
          // ...
          "/tntok/(.*)": "/tntok/$1",
        },
        requestHeaders: {
          "cache-control": "max-age=600",
        },
      };

      // if (window.location.hostname === 'tntok.cn' || window.location.host.startsWith('localhost:')) {
      if (window.location.hostname === "tntok.cn") {
        let prefix = "#/tntok";
        if (!window.location.hash) {
          window.location.href = prefix + "/";
        } else if (!window.location.hash.startsWith(prefix)) {
          window.location.href = window.location.hash.replace("#/", "#/tntok/");
        }
      }

      function addCss(element, fileName) {
        var link = document.createElement("link");
        link.type = "text/css";
        link.rel = "stylesheet";
        link.href = fileName;
        element.appendChild(link);
      }
    </script>
    <script src="static/docsify.min.js"></script>
    <script src="static/search.min.js"></script>
    <script src="static/zoom-image.min.js"></script>
  </body>
</html>
